<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<!--2、求一组数中的所有数的和/平均值-->
	<body>
		<script>
			var arr = [10,20,30,45,84,75,32,90,80,95];
            var sum = 0;
            for(var i=0;i<arr.length;i++){
            	sum += arr[i];
            }
            console.log("sum="+sum);
            var avg = sum/arr.length;
            console.log("avg="+avg);
		</script>
	</body>
</html>
